package com.du.spring5.bean;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

/**
 * @author : DuJiabao
 * @Project : spring
 * @Time : 2021/4/9 23:54
 * @Desc :
 */
@Component
public class User1 {
  //@Autowired
  private Phone phone;

  //@Autowired
  private User1(Phone phone) {
    this.phone = phone;
  }

  public User1() {
  }

  public Phone getPhone() {
    return phone;
  }

  //@Autowired
  public void setPhone(Phone phone) {
    this.phone = phone;
  }

  @Override
  public String toString() {
    return "User1{" +
            "phone=" + phone +
            '}';
  }
}
